<%@page import="java.sql.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%
    try
    {
    Class.forName("com.mysql.jdbc.Driver");
    Connection conexion = DriverManager.getConnection (
    					"jdbc:mysql://localhost/holamundo",
   						"root", 
    					"root");
    Statement s = conexion.createStatement();
    ResultSet rs = s.executeQuery (
    		"select * from tareas where nombre='"+
    		request.getParameter("nombre")+
    		"'");
    
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

<h1>DETALLE DE TAREA</h1>
<%
if (rs.next())
{
	%>
	NOMBRE: <%=rs.getString("nombre") %><br>
	DESCRIPCION: <%=rs.getString("descripcion") %>
<%
}else{
%>
NO HAY TAREAS CON ESE NOMBRE
<% 
}
conexion.close();
    } catch (Exception e)
{
   e.printStackTrace();
} 

%>


</body>
</html>